package com.ruoyi.web.wuchuan.enmu;

import com.ruoyi.web.wuchuan.command.*;
import com.ruoyi.web.wuchuan.handle.PDFModule;

public enum ModuleTypeEnum {
    ECOLOGY_COORDINATE_EXAMINATION("1",new EcologyExamaination()),//生态坐标体检报告
    ECOLOGY_COORDINATE_DISTRICT("2",new EcologyDistrict()),//生态功能区划片报告
    ECOLOGICAL_ISSUES_REPORT("3",new Issues()),//生态适宜报告
    AFFORESTATION_REPORT("4",new Afforestation()),//造林作业报告
    HOMOGENEOUS_AREA_QUERY_REPORT("5",new HomogeneousArea()),//同质化区域查询报告
    ANALYSIS_SUITABLE_SHRUB_AREA("6",new AnalysisSuitable()),//宜灌木区域分析报告
    YIQIAOMU_DISTRICT_ANALYSIS_REPORT("7",new YiqiaomuDistrict()),//宜乔木区分析报告
    ECOLOGICAL_ISSUES_REPORT_GNQSYBG("8",new IssuesGnqsybg()),//生态适宜报告--功能作业区适宜报告
    AFFORESTATION_REPORT_GNQSYBG("9",new AfforestationGnqsybg());//造林作业报告--功能区作业适宜报告
    private PDFModule pdfModule;
    private  String moduleType;
    ModuleTypeEnum(String moduleType, PDFModule pdfModule) {
        this.moduleType = moduleType;
        this.pdfModule = pdfModule;

    }
    public PDFModule get(){
        return this.pdfModule;
    }

    public static ModuleTypeEnum getByCode(String moduleType){
        for (ModuleTypeEnum m: ModuleTypeEnum.values()) {
            if(m.moduleType.equals(moduleType)){
                return m;
            }
        }
        return null;
    }
}
